<#include "/public/secfield.html">
<div class="layui-tab-content" style="padding:0px;">
    <div class="layui-tab-item layui-show">	
    	<div class="box default-box" >
			<div class="box-header">
				<h3 class="box-title">
					搜索条件
				</h3>
			</div>
			<div class="box-body">	
    			<form class="layui-form" name="search" action="/admin/reqlog/index.html" method="post">
    			<#include "/admin/system/reqlog/include/search.html">
    			</form>
			</div>
		</div>
		<div class="box default-box" style="height: 100%;overflow-y: scroll;">
			<div class="box-header">
				<h3 class="box-title">
					操作日志（${requestLogList.totalElements}）
				</h3>
			</div>
			<div class="box-body ukefu-im-theme">
				<div class="row">
					<div class="col-lg-12">
						<div class="row" style="padding:5px;">
							<div class="col-lg-12">
								<#if requestLogList?? && requestLogList.content?? && requestLogList.content?size gt 0>
								<table class="layui-table" lay-skin="line">
									  <thead>
										<tr>
										  <th>
											  <input type="checkbox" id="all" onclick="$('.ids').prop('checked' , $(this).prop('checked'));"/>
										  </th>
										  <th>名称</th>
										  <th>操作人</th>
										  <th>ip</th>
										  <th>hostname</th>
										  <th>url</th>
										  <th>登录或操作时间</th>
										  <th>退出时间</th>
										  <th width="1" nowrap="nowrap">操作</th>
										</tr> 
									  </thead>
									  <tbody>
										<#list requestLogList.content as log>
											<tr>
											  <td style="width:1%;">
												<input type="checkbox" class="ids" name="ids" value="${log.id!''}"/>
											  </td>
											  <th style="width:10%;">${log.name!''}</th>
											  <th style="width:10%;" nowrap="nowrap">${log.username!''}</th>
											  <th style="width:10%;">${log.ip!''}</th>
											  <th style="width:10%;">${log.hostname!''}</th>
											  <th style="width:10%;">${log.url!''}</th>
											 <!--  <th style="width:10%;"><#if log.starttime??>${log.starttime?string("yyyy-MM-dd HH:mm:ss")}</#if></th> -->
											  <th style="width:10%;"><#if log.createdate??>${log.createdate?string("yyyy-MM-dd HH:mm:ss")}</#if></th>
											  <th style="width:10%;"><#if log.endtime??>${log.endtime?string("yyyy-MM-dd HH:mm:ss")}</#if></th>
											  <td style="white-space:nowrap;width:1%;" nowrap="nowrap" >
										  		<a href="/admin/reqlog/detail.html?id=${log.id!''}" data-title="日志预览" data-width="950" data-height="650" data-toggle="ajax">
										  			<i class="kfont">&#xe722;</i>
										  			预览
										  		</a>
										      </td>
											</tr>
										</#list>
									  </tbody>
									</table>
									<#else>
									<div class="ukefu-empty">
										<i class="layui-icon"></i>
										<div style="">
											还没有操作日志记录
										</div>
									</div>	
								</#if>
							</div> 	   
						</div>
						<div class="row" style="padding:5px;">
							<div class="col-lg-12" id="page" style="text-align:center;"></div>
						</div>
					</div>	
				</div>
				
			</div>
		</div>
	</div>
</div>
<script>
	layui.use(['laypage', 'layer'], function(){
		  var laypage = layui.laypage
		  ,layer = layui.layer;
		  <#if msg??>
		  top.layer.msg('${msg}');
		  </#if>
		  laypage.render({
				elem: 'page'
				,pages: <#if requestLogList??>${requestLogList.totalPages}<#else>0</#if> //总页数
				,curr:<#if requestLogList??>${requestLogList.number+1}<#else>0</#if>
				,groups: 5 //连续显示分页数
				,jump:function(data , first){
					if(!first){
						location.href = "/admin/reqlog/index.html?p="+data.curr
							<#if q?? && q != "" >+"&q=${q!''}"</#if>
							<#if username?? && username != "">+"&username=${username!''}"</#if>
							<#if userid?? && userid != "" >+"&userid=${userid!''}"</#if>
							<#if ipp?? && ipp != "">+"&ip=${ipp!''}"</#if>
							<#if hostnamee?? && hostnamee != "">+"&hostname=${hostnamee!''}"</#if>
							<#if statues?? && statues != "">+"&statues=${statues!''}"</#if>
							<#if triggerwarning?? && triggerwarning !="">+"&triggerwarning=${triggerwarning!''}"</#if>
							<#if createdatebegin?? && createdatebegin != "">+"&createdatebegin=${createdatebegin!''}"</#if>
							<#if createdateend?? && createdateend != "">+"&createdateend=${createdateend!''}"</#if>
							<#if starttimebegin?? && starttimebegin != "">+"&starttimebegin=${starttimebegin!''}"</#if>
							<#if starttimeend?? && starttimeend != "">+"&starttimeend=${starttimeend!''}"</#if>
							<#if endtimebegin?? && endtimebegin != "">+"&endtimebegin=${endtimebegin!''}"</#if>
							<#if endtimeend?? && endtimeend != "">+"&endtimeend=${endtimeend!''}"</#if><#if triggertimebegin?? && triggertimebegin != "">+"&triggertimebegin=${triggertimebegin!''}"</#if>
							<#if triggertimeend?? && triggertimeend != "">+"&triggertimeend=${triggertimeend!''}"</#if>;
					}
				}
		   });
		});
</script>
<script>
//Demo
layui.use('form', function(){
  var form = layui.form;
  form.render(); //更新全部
});
layui.use('laydate', function() {
	var laydate = layui.laydate;
});
</script>